<template>
	<view class="content">
		<template v-if="label.length>0">
			<view class="block news-block" @click="navigate('/page_other/mySite/detail?id='+item.id)" v-for="(item,index) in label" :key="item.id">
				<block>
					<view class="form-item">
						<view class="form-content" style="color: #1A1A1A;font-size: 32rpx;font-weight: 290;">
							<view>
								<view class="form-label">孵化基地</view>
							</view>
							<view class="form-ctrl" style="margin-top: 20rpx;font-weight: 400;">
								{{item.siteName }}
							</view>
						</view>
					</view>
				<!-- <view v-else-if="label.length>0&&!listConf.more" style="text-align: center;">没有更多了哦</view> -->
				</block>
			</view>
		</template>
		<view v-else class="empty">暂无数据</view>
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex';
	import {
		getMySiteApplyForList,
		getSiteApplyForById
	} from '@/api/site.js';
	export default {
		data() {
			return {
				page:1,
				limit:10,
				type: [{
					id: 0,
					data: "全部"
				},],
				label: [],
			}
		},
		computed: {
			user() {
				return this.$store.getters.user
			}
		},
		onShow() {

		},
		onLoad() {},
		methods: {
			navigate(url) {
				uni.navigateTo({
					url
				})
			},
			
			getList(type) {
				uni.showLoading({
					title: '加载中',
					mask: true
				})
				getMySiteApplyForList({
					page:1,
					limit:10,
				}).then(data => {
					uni.hideLoading()
					this.label = data.list
				}).catch(() => {
					uni.hideLoading()
				})
			},
		},
		onLoad() {
			// this.getUser();
			this.getList()
		}
	}
</script>

<style lang="scss">
	page {
		background: #FAFAFA;
	}
	.content{
		padding: 30rpx;
		.form-content{
			margin-bottom: 20rpx;
			.form-label{
				font-size: 28rpx;
				.form-ctrl{
					font-size: 32rpx;
				}
			}
		}
		.news-block {
			display: flex;
			background-color: #fff;
			padding: 25rpx;
			box-shadow: 0px 0px 4px #ccc;
			border-radius: 10rpx;
			margin-bottom: 40rpx;
			.title {
				margin: 20rpx 0 30rpx 0;
			}
		
			.news {
				display: flex;
				background-color: #fff;
				padding: 25rpx;
				box-shadow: 0px 0px 4px #ccc;
				border-radius: 10rpx;
				margin-bottom: 30rpx;
				height: 230rpx;
		
				.news-icon {
					width: 180rpx;
					height: 180rpx;
					border-radius: 16rpx;
					margin-right: 20rpx;
				}
		
				.news-content {
					width: calc(100% - 200rpx);
					display: flex;
					flex-direction: column;
		
					.news-title {
						font-weight: bold;
						margin-bottom: 10rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-line-clamp: 1;
						-webkit-box-orient: vertical;
						word-break: break-all;
					}
		
					.desc {
						color: #999;
						font-size: 28rpx;
						margin-bottom: 10rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-line-clamp: 2;
						-webkit-box-orient: vertical;
						word-break: break-all;
						height: 80rpx;
					}
		
					.time {
						color: #999;
						font-size: 28rpx;
					}
				}
			}
		}
	}
	
</style>
